#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2019, Intel Corporation

#
# src/test/blk_rw_mt/TEST0 -- unit test for MT I/O on blk pool
#

. ../unittest/unittest.sh

# this is the short version of the test
require_test_type short

# doesn't make sense to run in local directory
require_fs_type pmem non-pmem

# libpmemblk does not support race detection tools
configure_valgrind helgrind force-disable
configure_valgrind drd force-disable

setup

truncate -s 1G $DIR/testfile1
# 5 threads, each doing 80 random I/Os
expect_normal_exit ./blk_rw_mt$EXESUFFIX 4096 $DIR/testfile1 123 5 80

check_pool $DIR/testfile1

check

pass
